<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>订单管理</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<header th:replace="common/cms_top"></header>
<div class="container mt-4">

    <h1>已发货订单</h1>

    <table class="table table-striped table-bordered">
        <thead class="table-dark">
        <tr>
            <th>Order ID</th>
            <th>User ID</th>
            <th>Order Date</th>
            <th>T</th>
            <th>Bill Address</th>
            <th>Ship Address</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="order : ${orderDeliveryList}">
            <td th:text="${order.orderid}"></td>
            <td th:text="${order.userid}"></td>
            <td th:text="${#dates.format(order.orderdate, 'yyyy-MM-dd')}"></td>
            <td th:text="${'$' + #numbers.formatDecimal(order.totalprice, 1, 2)}"></td>

            <td>
                <div th:text="${order.billtofirstname + ' ' + order.billtolastname}"></div>
                <div th:text="${order.billaddr1}"></div>
                <div th:text="${order.billaddr2}"></div>
                <div th:text="${order.billcity + ', ' + order.billstate + ' ' + order.billzip}"></div>
                <div th:text="${order.billcountry}"></div>
            </td>

            <td>
                <div th:text="${order.shiptofirstname + ' ' + order.shiptolastname}"></div>
                <div th:text="${order.shipaddr1}"></div>
                <div th:text="${order.shipaddr2}"></div>
                <div th:text="${order.shipcity + ', ' + order.shipstate + ' ' + order.shipzip}"></div>
                <div th:text="${order.shipcountry}"></div>
            </td>


        </tr>
        </tbody>
    </table>
</div>
<header th:replace="common/bottom"></header>
</body>
</html>